/**
 * jims
 */
package com.jims.master.modules.blood.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.common.web.impl.BaseDto;
import com.jims.master.modules.blood.entity.BloodApply;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用血申请DAO接口
 * @author CTQ
 * @version 2017-04-10
 */
@MyBatisDao
public interface BloodApplyDao extends CrudDao<BloodApply> {

    /**
     * 根据申请单号查询申请信息
     * @param applyNum 申请单号
     * @return
     * @author fengyg
     */
    public BloodApply getByApplyNum(@Param("applyNum")String applyNum);

    /**
     * 根据申请单号修改申请表状态
     * @param applyNum 申请单号
     * @param applyStatus 要被修改成的状态
     * @return
     * @author fengyg
     */
    public int updateApplyStatus(@Param("applyNum")String applyNum,@Param("applyStatus")String applyStatus);

    /**
     * 根据用血申请单号查询患者用血申请信息
     * @param bloodApply
     * @return
     * @author fengyg
     * @date 2017-07-26
     */
    public BaseDto getPatientBloodInfoByApplyNum(BloodApply bloodApply);

    /**
     * 根据患者住院ID查询患者诊断信息
     * @param visitId 住院ID
     * @param orgId 组织机构ID
     * @return
     * @author fengyg
     * @date 2017-07-26
     */
    public List<BaseDto> getDiagnosisTypeByVisitId(@Param("visitId")String visitId,@Param("orgId")String orgId);
}